package com.longjianghuasheng.logistics.business.order.adapter

import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.longjianghuasheng.logistics.R
import com.longjianghuasheng.logistics.databinding.ItemFileBinding
import com.longjianghuasheng.logistics.entity.FileItem
import com.longjianghuasheng.logistics.ext.setAdapterAnimation

class FileAdapter :
    BaseQuickAdapter<FileItem, BaseDataBindingHolder<ItemFileBinding>>(R.layout.item_file) {

    var isSigning = false

    init {

        setAdapterAnimation()
    }

    override fun convert(holder: BaseDataBindingHolder<ItemFileBinding>, item: FileItem) {
        holder.dataBinding?.run {

            tvName.text = item.name

            ivDownload.isVisible = isSigning


            tvDelete.isGone = isSigning


        }
    }
}